package com.back.vo;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 注册时对应的视图数据类（view object），
 * 用于接收并处理邮箱验证码注册的数据。
 */
@Data
public class EmailRegisterVo {
    @NotEmpty(message = "{sys.user.name.notEmpty}")
    @Pattern(message = "{sys.user.name.format.error}", regexp = "^.*[^\\d].*$")
    private String userName;
    
    @NotEmpty(message = "{sys.user.password.notEmpty}")
    private String password;
    
    @NotEmpty(message = "{sys.user.email.notEmpty}")
    @Email(message = "{sys.user.email.format.error}")
    private String email;

    private String role;
    
    @NotEmpty(message = "{sys.user.code.notEmpty}")
    private String code;
    
    @NotEmpty(message = "{sys.user.mobile.notEmpty}")
    private String mobile;

    private String contactNumber;   
    
    // 创建求职者时补充的信息
    private String name;
    private String gender;
    private Integer age;
    
    // 创建用人单位时补充的信息
    private String employerName;
    private String address;
    private Long serviceCenterId;
} 